package com.eisei.factory.tbl;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * Created by equipo.crea on 3/08/14.
 */
public class TblRelGrupoRolEntityPK implements Serializable {
    private BigDecimal fkCatRolGrupo;
    private BigDecimal fkCatRol;

    @Column(name = "FK_CAT_ROL_GRUPO", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    @Id
    public BigDecimal getFkCatRolGrupo() {
        return fkCatRolGrupo;
    }

    public void setFkCatRolGrupo(BigDecimal fkCatRolGrupo) {
        this.fkCatRolGrupo = fkCatRolGrupo;
    }

    @Column(name = "FK_CAT_ROL", nullable = false, insertable = true, updatable = true, length = 0, precision = -127)
    @Id
    public BigDecimal getFkCatRol() {
        return fkCatRol;
    }

    public void setFkCatRol(BigDecimal fkCatRol) {
        this.fkCatRol = fkCatRol;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TblRelGrupoRolEntityPK that = (TblRelGrupoRolEntityPK) o;

        if (fkCatRol != null ? !fkCatRol.equals(that.fkCatRol) : that.fkCatRol != null) return false;
        if (fkCatRolGrupo != null ? !fkCatRolGrupo.equals(that.fkCatRolGrupo) : that.fkCatRolGrupo != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = fkCatRolGrupo != null ? fkCatRolGrupo.hashCode() : 0;
        result = 31 * result + (fkCatRol != null ? fkCatRol.hashCode() : 0);
        return result;
    }
}
